<?
if(!isset($title)){
	$title="Please Log In";
}

if(!isset($params)){
	$params=array();
}

if(!isset($view)){
	$view="auth/login_form";
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?=$title?></title>
<link type="text/css" rel="stylesheet" media="screen" href="<?=base_url('jslib/jquery-ui-1.8.16.custom/css/smoothness/jquery-ui-1.8.16.custom.css');?>" />
<script type="text/javascript" language="javascript" src="<?=base_url('jslib/jquery-1.6.4.min.js');?>"></script>
<script type="text/javascript" language="javascript" src="<?=base_url('jslib/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js');?>"></script>
<script type="text/javascript" language="javascript" src="<?=base_url('jslib/jquery-validation-1.8.1/jquery.validate.min.js');?>"></script>
<script type="text/javascript" language="javascript" src="<?=base_url('jslib/jquery-toggleit.min.js');?>"></script>
<script type="text/javascript" language="javascript">
$(function(){
	$('#login_form').validate({
		errorClass: 'ui-state-error'
	});
	$('#form_dialog').dialog({
		resizable:false,
		width: 400,
		modal:true
	});
	
	$('#form_container label').not('.no-ui').addClass('ui-widget-header ui-corner-left');
	$('#form_container div.full label').not('.no-ui').addClass('ui-corner-right');
	$('#form_container :input').not("[type=submit]").not('[type=checkbox]').addClass('ui-input ui-corner-right');
	
	$('#form_container :input[type=checkbox]').height($('#form_container label').height());
	
});
</script>
<style>
#login_form {
	width:320px;
	margin: 0px auto;
}

#form_container div {
	display:block;
	clear:both;
	float:none;
}

#form_container label {
	display:block;
	width:150px;
	float:left;
	clear:left;
	text-align:right;
	padding:3px;
	border-right:0px solid #ffffff;
}

#form_container .ui-state-error {
	display:block;
	width:190px;
	padding:3px;
	float:none;
	clear:both;
	text-align:left;
	margin-left:157px;
	border-right:1px solid #CD0A0A;
	border-top:0px solid #CD0A0A;
	
	-moz-border-radius-bottomleft: 4px;
	-webkit-border-bottom-left-radius: 4px; 
	-khtml-border-bottom-left-radius: 4px; 
	border-bottom-left-radius: 4px;
	-moz-border-radius-bottomright: 4px; 
	-webkit-border-bottom-right-radius: 4px; 
	-khtml-border-bottom-right-radius: 4px; 
	border-bottom-right-radius: 4px; 
}

#form_container .ui-state-error:empty {
	display:none;
}

#form_container input {
	padding:3px;
	display:block;
	width: 200px;
	margin-bottom:0px;
}

#form_container input[type=checkbox] {
	display:inline;
	width:20px;
}

#form_container div.full label {
	border-right:1px solid #AAAAAA;
	width:340px;
}

</style>
</head>
<body>
	<div id="form_dialog" title="<?=$title?>">
		<div id="form_container">
			<?=$this->load->view($view,$params, true)?>
		</div>
	</div>
</body>
</html>
